package com.gaoding.qa.auto.base;

import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.gaoding.commons.dto.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author mobai
 * @since 2021/9/25 18:28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
public class BaseTokenDTO extends BaseDto {
    private String accessToken;
    private Long refreshTokenExpiresIn;
    private List<OrgInfoDTO> orgList;
    private String refreshToken;
    private String deviceId;
    private String tokenType;
    private Integer expiresIn;
    private String account;

    @Data
    @EqualsAndHashCode(callSuper = true)
    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    public static class OrgInfoDTO extends BaseDto{
        private String orgId;
        private String orgCode;
        private String orgName;
        private Logo logo;


    }

    @Data
    @EqualsAndHashCode(callSuper = true)
    @JsonNaming(PropertyNamingStrategy.SnakeCaseStrategy.class)
    public static class Logo extends BaseDto{
        private Integer height;
        private Integer width;
        private String url;
    }
}
